Skip to content

test(enrichment): cover requirementTokens dedup, stopword, and alnum branches - #3409

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
dhgoal:test/history-requirement-tokens
Jul 5, 2026
Merged

test(enrichment): cover requirementTokens dedup, stopword, and alnum branches#3409
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
dhgoal:test/history-requirement-tokens

Conversation

@dhgoal

@dhgoal dhgoal commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Hardens unit coverage for the history analyzer's pure requirementTokens tokenizer. Its single existing test only exercises length-based drops (its dropped words are all under the 4-char floor), leaving three branches uncovered:

  • case-insensitive deduplication — repeated words (any case) collapse to one token
  • the stopword set — a word at/above the length floor (e.g. feature/should/support) is dropped by the stopword check itself, not the length floor
  • alphanumeric tokens + punctuation splitting — digits are kept within a token; /, -, ., space are split points

Test-only, against the compiled dist/, in the analyzer's own test file. No source or shared-registry change.

No linked issue — branch-coverage hardening of a pure function; no runtime behavior change.

Scope

  • Conventional Commit; focused; touches only review-enrichment/test/history.test.ts. No site//CNAME/**/lovable/**; no CHANGELOG.md.

Validation

  • npm --prefix review-enrichment test — full suite green (build + sourcemap validate + metadata --check + node tests; exactly CI).
  • git diff --check clean.

Safety

  • Test-only, no runtime change. No secrets/wallets/hotkeys/trust/reward terms.

…branches

The single existing test only exercised length-based drops. Adds the uncovered
branches: case-insensitive deduplication, a >=4-char word dropped by the
stopword set (not the length floor), and alphanumeric tokens split on
punctuation. Test-only.
@dhgoal
dhgoal requested a review from JSONbored as a code owner July 5, 2026 06:30
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 5, 2026
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 06:33:13 UTC

1 file · 1 AI reviewer · no blockers · readiness 80/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This is a focused test-only change that adds direct coverage for requirementTokens deduplication, stopword filtering, and alphanumeric token handling without touching runtime code. The added assertions exercise real public behavior through the compiled analyzer import already used by this file, and CI is green on the exact commit. The only material gap is that the punctuation test does not fully match the PR's stated slash/dot coverage.

Nits — 2 non-blocking
  • nit: review-enrichment/test/history.test.ts:339 says the test covers punctuation splitting, but the assertion only covers hyphen and whitespace while the PR description specifically calls out slash and dot too.
  • review-enrichment/test/history.test.ts:340: either include slash and dot in the fixture, for example `oauth2 retry-loop config.v2/api`, or narrow the PR description/test name to the punctuation cases actually asserted.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 69 registered-repo PR(s), 42 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor dhgoal; Gittensor profile; 69 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: dhgoal
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 69 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 102ca62 into JSONbored:main Jul 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant